package main

import (
	"Graphite/database"
	"Graphite/router"
	"Graphite/util"
    "Graphite/gredis"
	"fmt"
)

func init(){
gredis.GetRedisPool()
	database.GetMongoDB()
	util.InitValidator() //验证
}
func main() {

	r := router.SetupRouter()
	//r.Use(middleware.MiddleWare())    //全局中间件
	router.InitRouter(r)

	if err := r.Run(":7001"); err != nil {
		fmt.Printf("startup service failed, err:%v\n", err)
	}

	//r.Run(":8089")
}
